﻿using UnityEngine;
using System.Collections;
using System.Collections.Generic;

/*
 * Debug_DrawHint
 * 测试使用，突显坐标
 *
 *
 * 依赖：
 *
 * ！不写重复代码！
 * @author TTun
 * @date 7/14/2017 10:32:09 AM
 */
namespace TTGameEngine {

public class Debug_DrawHint : MonoBehaviour {
    public enum HintShape {
        WireCube,
        WireSphere,
        Line,
    }
    public bool isShow = true;
    public float size = 0.1f;
    public HintShape shape = HintShape.WireCube;

    public void Init(HintShape aShape, float aSize) {
        shape = aShape;
        size = aSize;
    }

    void OnDrawGizmos() {
        if(isShow == false) {
            return;
        }
        Color backupColor = Gizmos.color;
        Gizmos.color = Color.white;
        switch(shape) {
            case HintShape.WireCube:
                Gizmos.DrawWireCube(transform.position, Vector3.one * size);
                break;
            case HintShape.WireSphere:
                Gizmos.DrawWireSphere(transform.position, size);
                break;
            case HintShape.Line:
                Gizmos.DrawLine(transform.position, size * transform.forward);
                break;
        }

        Gizmos.color = backupColor;
    }
}

}
